TPT-4474: Added support for Configurable VPC IPv4 Prefixes#712
Merged
Conversation
* Added support for Configurable VPC IPv4 Prefixes * Fix lint * Fix lint * Add LA notices * Clean up test * Updated field name and fixed tests * Fix lint * Added doc link
Open
mawilk90
approved these changes
Jul 13, 2026
zliang-akamai
approved these changes
Jul 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds client/library support for configurable VPC IPv4 prefixes by introducing a new GET /vpcs/default-ranges helper and wiring an ipv4 field into VPC create/update/load flows, with accompanying unit/integration tests and fixtures.
Changes:
- Added
VPCIPv4DefaultRangemodel andVPCGroup.default_ranges()forGET /vpcs/default-ranges. - Added VPC
ipv4property support (CRUD create param + mutable property for updates viasave()). - Expanded unit/integration coverage and updated/added fixtures for the new response shapes.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/objects/vpc_test.py | Extends VPC object validation to assert IPv4 range parsing. |
| test/unit/groups/vpc_test.py | Adds unit test for vpcs.default_ranges() and validates VPC IPv4 ranges in group tests. |
| test/integration/models/vpc/test_vpc.py | Adds integration tests for default ranges retrieval and VPC create/load/update with ipv4. |
| test/integration/conftest.py | Adds integration fixture to create/cleanup a VPC configured with an IPv4 range. |
| test/fixtures/vpcs.json | Updates VPC list fixture to include ipv4. |
| test/fixtures/vpcs_default-ranges.json | Adds fixture for the new /vpcs/default-ranges endpoint. |
| test/fixtures/vpcs_123456.json | Updates single VPC fixture to include ipv4. |
| linode_api4/objects/vpc.py | Introduces IPv4-related JSONObject dataclasses and adds ipv4 as a mutable VPC property. |
| linode_api4/groups/vpc.py | Extends VPC create to accept ipv4 and adds default_ranges() group method. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+64
to
+65
| :param ipv4: The IPv4 address ranges for this VPC. Note that IPv4 VPCs may not currently be available to all users. | ||
| :type ipv4: List[Union[VPCIPv4RangeOptions, Dict[str, Any]]] |
Comment on lines
+13
to
+17
| @dataclass | ||
| class VPCIPv4DefaultRange(JSONObject): | ||
| """ | ||
| VPCIPv4DefaultRange represents the default settings for the internal and forbidden IPv4 address ranges in VPCs. | ||
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Added support for new
GET /vpcs/default-rangesendpoint and updated behavior of CRUD operations for VPC to support newipv4field✔️ How to Test
make test-unitmake test-int TEST_CASE=test_get_vpc_default_rangesmake test-int TEST_CASE=test_vpc_with_ipv4